function [ F ] = prepareF(f, g, h)
%PREPAREF Summary of this function goes here
%   Detailed explanation goes here

t = zeros(size(g,1),size(g,2));
t(2,:)=g(1,:);
t(end-1,:)=t(end-1,:)+g(end,:);
t(:,2)=t(:,2)+g(:,1);
t(:,end-1)=t(:,end-1)+g(:,end);
t=crop(t);

F = reshape(f - (t./(h.^2)), size(f,1)*size(f,2), 1);

end

